/********************************************************************
	created:	2011/04/16
	created:	16:4:2011   23:18
	filename: 	d:\Work\Job\trunk\Speed\NewTaskDialog.h
	file path:	d:\Work\Job\trunk\Speed
	file base:	NewTaskDialog
	file ext:	h
	author:		liang
	
	purpose:	
*********************************************************************/
#ifndef _NewTaskDialog_h_2011_04_16_23_18
#define _NewTaskDialog_h_2011_04_16_23_18

extern const char* g_DefaultPath;

#include <QtGui>
#include "ui_NewTask.h"

class NewTaskDialog : public QDialog
{
	Q_OBJECT
public:
	NewTaskDialog(QWidget* pParent);
	virtual ~NewTaskDialog();

	QString GetTaskUrl();
	void SetTaskUrl(const QString& Url);

    QString GetTaskPath();

	bool NewTask();
    void AddPath();

protected slots:	
    bool UrlChanged();
    bool PathChanged();
	bool OpenDir();

private:
    bool CheckTaskValid(const QString& url);

	Ui::Task m_newtask;

    QFileDialog* m_pOpenFileDialog;

    int m_newinsertIndex;
};



#endif
